package com.cmsr.hdpf.etl.watermark

import com.cmsr.hdpf.model.RsmDataStream
import org.apache.flink.streaming.api.functions.timestamps.BoundedOutOfOrdernessTimestampExtractor
import org.apache.flink.streaming.api.windowing.time.Time

class BoundedAssigner
  extends BoundedOutOfOrdernessTimestampExtractor[RsmDataStream](Time.seconds(5)) {

  /** Extracts timestamp from RawDataStream. */
  override def extractTimestamp(r: RsmDataStream): Long = r.timestamp.toLong

}